home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / mg2a_src.zip / SYS / AMIGA / MAKEFILE.MAN < prev    next >
Text File  |  1988-08-23  |  9KB  |  262 lines

  1. #
  2. # Makefile for Amiga MG 2x, using Manx small model.
  3. #
  4. # This Makefile should be executed in the main Emacs directory.
  5. #
  6. # System-dependent conditional compilation possibilities:
  7. #
  8. # V11  -- must be defined for the editor to either run on
  9. #      or compile on a version 1.1 AmigaDOS system.
  10. #      It mainly wards against bugs in the 1.1 ROM
  11. #      Kernel.
  12. #
  13. # NO_STARTUP -- if defined, code for using a startup file
  14. #      is not included.
  15. #
  16. # MENU  -- if defined, Intuition menu selection is
  17. #      enabled.  If you #define this, the XOBJ macro
  18. #      must contain $(MENUOBJ).
  19. #
  20. # BROWSER  -- BROWSER uses the Amiga menu to present a MENU of
  21. #      files. Selecting a directory entry (ends with a /)
  22. #      makes the contents if that directory the next menu
  23. #      (deleting any menus that used to follow it);
  24. #      selecting a plain file does a "find-file" on that
  25. #      file name. Really has to be seen to be understood.
  26. #      XOBJ must contain $(MENUOBJ) for this to link.
  27. #
  28. # MOUSE  -- if defined, the Amiga mouse is active.
  29. #      If you #define this, XOBJ must contain $(MOUSEOBJ)
  30. #
  31. # FKEYS  -- if defined, the editor understands the Amiga
  32. #      function keys.
  33. #
  34. # NO_BACKUP -- Disable the creation of backup files. If this
  35. #      option is defined, the function make-backup-files
  36. #      sets a flag that causes save-buffers (C-x C-s)
  37. #      to rename the original file to file~ before
  38. #      writing the file.  Nice if the space is available.
  39. #      By default, backup files are not made.  Calling
  40. #      make-backup-files with no argument enables this
  41. #      feature; calling it with an argument disables it.
  42. #
  43. # DO_METAKEY -- if defined, characters with high bit set (i.e.
  44. #      most ALT-ed characters in the usa0 keymap)
  45. #      are translated into internal META keys
  46. #
  47. # DO_ICONIFY -- if defined, provide a function to iconify the Emacs
  48. #      window into a gadget that can be double-clicked to
  49. #      return to the normal display.
  50. #
  51. # CHANGE_COLOR -- if defined, adds commands to manipulate
  52. #      the rendition of the mode line and the
  53. #      foreground and background color of the
  54. #      text window and mode line.  The names match
  55. #      the regular expression
  56. #      set-{text,mode}-{foreground,background}
  57. # CHANGE_FONT -- if defined, adds "set-font", which prompts
  58. #      for a font name and size, then tries to reopen
  59. #      the Emacs window using the new font.
  60. # USE_ARP  -- Use the ARP (AmigaDOS Replacement Library) for
  61. #      some functions.  This makes the executable
  62. #      slightly smaller, but gives no new functionality
  63. #      in the current version.  It will probably be
  64. #      required for some future version.  Note that
  65. #      LIBS needs to be changed to "-la -lc" if you
  66. #      use ARP.
  67. #
  68. #
  69. # MODE_RENDITION -- the these values indicate the way to render
  70. # TEXT_RENDITION    characters in the text area and mode line.
  71. #      TEXT_RENDITION is mainly there for completeness.
  72. #      Possible values are:
  73. #    0 -- plain text
  74. #    1 -- boldface
  75. #    3 -- italic
  76. #    4 -- underscore
  77. #    7 -- reverse-video (default if not defined)
  78. #
  79. # TEXT_FG  -- specifies which system color (0-7) to use
  80. # TEXT_BG     when drawing the text and mode line.  If they
  81. # MODE_FG     aren't between 0 and 7, or if a combination
  82. # MODE_BG     comes out badly, it's *YOUR* fault.  If
  83. #      CHANGE_COLOR is defined, you get to change these
  84. #      values on the fly.  Naturally, making both
  85. #      FG and BG the same results in an unusable display...
  86. #
  87. ############################################################################
  88. SYS = amiga
  89. S = sys/amiga
  90. LIBS = -lc
  91.  
  92. #
  93. # PREFS contains the defines used to select compile-time options.
  94. # XOBJ is used to denote any extra object files needed for these
  95. # options.  MENUOBJ and MOUSEOBJ denote the extra object files
  96. # needed for the menu, mouse and Browser.
  97.  
  98. MOUSEOBJ = ttymouse.o
  99. MENUOBJ  = ttymenu.o menustack.o
  100. OFFSETOBJ = offset.o
  101. ICONIFYOBJ = iconify.o ttyicon.o
  102.  
  103. # The big burrito, with the Browser *and* the editing MENU.  Tough
  104. # on space, but boy is it neat...
  105. PREFS = -DSTARTUP -DDO_METAKEY -DDO_ICONIFY -DCHANGE_FONT -DCHANGE_COLOR \
  106.  -DBACKUP -DFKEYS -DMOUSE -DMENU -DBROWSER
  107. XOBJ  = $(MOUSEOBJ) $(MENUOBJ) $(ICONIFYOBJ)
  108.  
  109. # Burrito style, with just the Browser...
  110. #PREFS = -DSTARTUP  -DBROWSER -DMOUSE -DCHANGE_COLOR -DFKEYS -DDO_ICONIFY -DDO_M
  111. #XOBJ  = $(MOUSEOBJ) $(MENUOBJ) $(OFFSETOBJ) $(ICONIFYOBJ)
  112.  
  113. # Burrito style, with just the menu...
  114. #PREFS = -DSTARTUP  -DMENU -DMOUSE -DCHANGE_COLOR -DFKEYS -DDO_ICONIFY -DDO_META
  115. #XOBJ  = $(MOUSEOBJ) $(MENUOBJ) $(OFFSETOBJ) $(ICONIFYOBJ)
  116.  
  117.  
  118. # Mike's favorite version
  119. #PREFS = -DMOUSE -DBROWSER -DMODE_RENDITION=0 -DMODE_FG=2 -DDO_METAKEY \
  120. # -DGOSREC -DV11 -DMEYN
  121. #XOBJ = $(MOUSEOBJ) $(MENUOBJ)
  122.  
  123. # Mic's favorite version
  124. #PREFS = -DSTARTUP -DMENU -DMOUSE -DCHANGE_FONT -DFKEYS
  125. # -DDO_METAKEY -DDO_ICONIFY -DBACKUP -DPREFIXREGION
  126. #XOBJ  = $(MOUSEOBJ) $(MENUOBJ) $(OFFSETOBJ) $(ICONIFYOBJ)
  127.  
  128. # Steve's favorite version
  129. #PREFS  = -DSTARTUP -DMOUSE -DCHANGE_FONT -DFKEYS -DDO_METAKEY \
  130. #  -DBACKUP -DPREFIXREGION -DUSE_ARP
  131. #XOBJ   = $(MOUSEOBJ)
  132. # Notice the "-la" here to use ARP's library as well as the standard one.
  133. #LIBS = -la -lc
  134.  
  135. # Absolutely bare-bones, default editor
  136. #PREFS = -DDO_METAKEY
  137. #XOBJ  =
  138.  
  139. CFLAGS = -I$(S) -Isys/default $(PREFS) -DAMIGA -DMANX -DBINDKEY
  140.  
  141. # Objects which only depend on the "standard" includes
  142. OBJS = basic.o dir.o dired.o file.o line.o match.o paragraph.o \
  143.    random.o region.o search.o version.o window.o word.o
  144.  
  145. # Those with unique requirements
  146. IND = buffer.o display.o echo.o extend.o help.o kbd.o keymap.o \
  147.    macro.o main.o modes.o regex.o re_search.o
  148.  
  149. # System dependent objects
  150. OOBJS = cinfo.o spawn.o ttyio.o tty.o ttykbd.o fileio.o sleep.o \
  151.  sysinit.o malloc.o console.o dirio.o
  152.  
  153. OBJ = $(OBJS) $(IND) $(OOBJS) $(XOBJ)
  154.  
  155. OSRCS = cinfo.c fileio.c spawn.c ttyio.c tty.c ttykbd.c fileio.c sleep.c \
  156.    sysinit.c malloc.c console.c dirio.c
  157. SRCS = basic.c dir.c dired.c file.c line.c match.c paragraph.c \
  158.    random.c region.c search.c version.c window.c word.c \
  159.    buffer.c display.c echo.c extend.c help.c kbd.c keymap.c \
  160.    macro.c main.c modes.c regex.c re_search.c
  161.  
  162. OINCS = $(S)/ttydef.h $(S)/sysdef.h sys/default/chrdef.h
  163. INCS = def.h
  164.  
  165.  
  166. #
  167. # The editor
  168. # Building in Ram: saves a LOT of time in pass 2 of the linker.
  169. #
  170. mg:        $(OBJ)
  171.         ln -o ram:mg -w $(OBJ) $(LIBS)
  172.         copy ram:mg mg
  173.         delete ram:mg
  174.  
  175. lint:
  176.     lint +vm -ilint: -e7?? $(CFLAGS) std.lnt mg
  177.  
  178. $(OBJ):        $(INCS) $(OINCS)
  179.  
  180. dir.o search.o:    $(INCS) $(OINCS)
  181.  
  182. regex.o re_search.o:    $(INCS) $(OINCS) regex.h
  183.  
  184. kbd.o:    $(INCS) $(OINCS) macro.h kbd.h key.h
  185.  
  186. macro.o main.o:    $(INCS) $(OINCS) macro.h
  187.  
  188. buffer.o display.o keymap.o help.o modes.o dired.o fileio.o: \
  189.     $(INCS) $(OINCS) kbd.h
  190.  
  191. extend.o:    $(INCS) $(OINCS) kbd.h macro.h key.h
  192.  
  193. help.o:    $(INCS) $(OINCS) kbd.h key.h macro.h
  194.  
  195. echo.o:    $(INCS) $(OINCS) key.h macro.h
  196.  
  197. $(OOBJS):    $(INCS) $(OINCS)
  198.  
  199. clean:
  200.     Delete $(OBJ)
  201.  
  202.  
  203. fileio.o:    $(S)/fileio.c
  204.         cc $(CFLAGS) -o fileio.o $(S)/fileio.c
  205.  
  206. spawn.o:    $(S)/spawn.c
  207.         cc $(CFLAGS) -o spawn.o $(S)/spawn.c
  208.  
  209. sleep.o:    $(S)/sleep.c
  210.         cc $(CFLAGS) -o sleep.o $(S)/sleep.c
  211.  
  212. sysinit.o:    $(S)/sysinit.c
  213.         cc $(CFLAGS) -o sysinit.o $(S)/sysinit.c
  214.  
  215. malloc.o:    $(S)/malloc.c
  216.         cc $(CFLAGS) -o malloc.o $(S)/malloc.c
  217.  
  218. offset.o:    $(S)/offset.c
  219.         cc $(CFLAGS) -o offset.o $(S)/offset.c
  220.  
  221. iconify.o:    $(S)/iconify/iconify.c $(S)/iconify/iconify.h
  222.         cc $(CFLAGS) -I$(S)/iconify -o iconify.o $(S)/iconify/iconify.c
  223.  
  224. tty.o:        $(S)/tty.c
  225.         cc $(CFLAGS) -o tty.o $(S)/tty.c
  226.  
  227. ttyicon.o:    $(S)/ttyicon.c
  228.         cc $(CFLAGS) -I$(S)/iconify -o ttyicon.o $(S)/ttyicon.c
  229.  
  230. ttyio.o:    $(S)/ttyio.c
  231.         cc $(CFLAGS) -o ttyio.o $(S)/ttyio.c
  232.  
  233. ttykbd.o:    $(S)/ttykbd.c
  234.         cc $(CFLAGS) -o ttykbd.o $(S)/ttykbd.c
  235.  
  236. ttymenu.o:    $(S)/ttymenu.c
  237.         cc $(CFLAGS) -o ttymenu.o $(S)/ttymenu.c
  238.  
  239. ttymouse.o:    $(S)/ttymouse.c
  240.         cc $(CFLAGS) -o ttymouse.o $(S)/ttymouse.c
  241.  
  242. menustack.o:    $(S)/menustack.c
  243.         cc $(CFLAGS) -o menustack.o $(S)/menustack.c
  244.  
  245. console.o:    $(S)/console.c
  246.         cc $(CFLAGS) -o console.o $(S)/co